package mse.eai.esb;

import org.jboss.soa.esb.ConfigurationException;
import org.jboss.soa.esb.helpers.ConfigTree;
import org.jboss.soa.esb.listeners.ScheduledEventMessageComposer;
import org.jboss.soa.esb.message.Message;
import org.jboss.soa.esb.message.format.MessageFactory;
import org.jboss.soa.esb.message.format.MessageType;
import org.jboss.soa.esb.schedule.SchedulingException;

public class ScheduledDailyDigestMessageComposer implements
		ScheduledEventMessageComposer {
	public void initialize(ConfigTree config) throws ConfigurationException {
		System.out.println("** initialize: " + config);
	}

	public void uninitialize() {
		System.out.println("uninitialize **");
	}

	public Message composeMessage() throws SchedulingException {
		
		Message myMessage = MessageFactory.getInstance().getMessage(
				MessageType.DEFAULT_TYPE);
		
		return myMessage;
	}

	public Message onProcessingComplete(Message message)
			throws SchedulingException {
		System.out.println("onProcessingComplete");
		return message;
	}
}
